package cn.yr.search.api;

import cn.yr.common.core.constant.ServiceNameConstants;
import cn.yr.common.core.domain.entity.YrArticle;
import cn.yr.common.exception.ret.Ret;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "ArticleSearchApi" , value = ServiceNameConstants.SERVICE_SEARCH)
public interface ArticleSearchApi {

    @PostMapping("addArticle")
    Ret addArticle(@RequestBody YrArticle yrArticle);

    @PostMapping("updateArticle")
    Ret updateArticle(@RequestBody YrArticle yrArticle);

    @DeleteMapping("deleteArticle")
    Ret deleteArticle(Long id);
}
